﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common.OjbectPool
{
    public class EvictionConfig
    {
        private readonly long idleEvictTime;


        private readonly int minIdle;
        public int MinIdle
        {
            get { return minIdle; }
        }


        public long IdleEvictTime
        {
            get { return idleEvictTime; }
        }


        public EvictionConfig(long poolIdleEvictTime,
           int minIdle)
        {
            if (poolIdleEvictTime > 0)
            {
                idleEvictTime = poolIdleEvictTime;
            }
            else
            {
                idleEvictTime = Int64.MaxValue;
            }

            this.minIdle = minIdle;
        }

    }
}
